//
//  CalculateHeight.m
//  Project_B
//
//  Created by 张闯的mac pro on 15/11/25.
//  Copyright © 2015年 张闯. All rights reserved.
//

#import "CalculateHeight.h"

@implementation CalculateHeight

+ (CGFloat)heightWithText:(NSString *)text fontSize:(NSInteger)fontsize
{
    NSDictionary *dic = @{NSFontAttributeName:[UIFont systemFontOfSize:16]};
    CGSize size = CGSizeMake(375 - 20, 2000 * 667);
    CGRect rect = [text boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    return rect.size.height;
    
}

@end
